import java.util.Objects;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: XMQ
 * Date: 2022-05-25
 * Time: 18:18
 */
class Person{
    public String id;

    @Override
    public String toString() {
        return "Person{" +
                "id='" + id + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Person person = (Person) o;
        return Objects.equals(id, person.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}
class Student{

}
public class TestDemo {

    public static void main(String[] args) {

    }
    public static void func(Object obj){
        Person person = new Person();
        person.id = "123";
        Object o = person;
        System.out.println(o);
    }
    public static void main1(String[] args) {
        Person personon = new Person();
        func(personon);
    }
}
